package websocket

import "net/http"

type DailOptions func(option *dailOption)

type dailOption struct {
	patten  string
	hanlder http.Header
}

func newDailOptions(opts ...DailOptions) dailOption {
	o := dailOption{
		patten:  "/ws",
		hanlder: nil,
	}

	for _, opt := range opts {
		opt(&o)
	}

	return o
}

func WithClientPatten(path string) DailOptions {
	return func(opt *dailOption) {
		opt.patten = path
	}
}

func WithClientHeader(hanlder http.Header) DailOptions {
	return func(opt *dailOption) {
		opt.hanlder = hanlder
	}
}
